<!-- sua bai viet-->
<?php echo validation_errors(); ?>

<form method="POST" action="<?php echo base_url().'admin/xuly/option_value/list/'.$this->uri->segment(5);?>">
<div class="box_heading">
    <div class="icon">
    <img src="<?php echo base_url().'template/admin/images/icon_settings.png';?>"/> Sửa Danh mục sản phẩm( <span style="color: red;"> * : không được để trống</span> )  <?php if(!empty($thongbao)){echo '<img src='.base_url().'template/admin/images/ok.png class="ok"><font color=red><b>'.$thongbao.'</b></font>';}?>
    </div>
    <div class="right">    
    <a href="<?php echo base_url().'admin/xuly/option_value';?>">Hủy</a>
    </div>
</div>

<div class="box_noidung">
<table class="form">
<tr><td><font color=red>* </font>Tiêu đề</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->title;};?>" name="title"/></td></tr>
<tr><td><font color=red>* </font>Trạng thái</td><td>
                                            <select name="publish">                                            
                                              <option <?php if(!empty($data)){if($data->publish=='1')echo 'selected="selected"';} ?> value='1'>Hiện</option>';
                                              <option <?php if(!empty($data)){if($data->publish=='0')echo 'selected="selected"';} ?> value='0'>Ẩn</option>';                                              
                                            </select> 
                                            </td></tr>
<tr><td><font color=red>* </font>Thuộc tính sản phẩm</td><td>
                                            <select name="option"> 
                                            <?php 
                                            if(!empty($cat)){
                                                foreach ($cat as $data2){
                                                    $mang[$data2->id]=$data2->title;
                                                }
                                            }
                                            $mang[0] = 'Không chọn';
                                            foreach($mang as $key=>$value)
                                                if($data->option==$key){
                                                    echo '<option selected="selected" value="'.$key.'">'.$value.'</option>';
                                                    
                                                } else{
                                                    echo '<option value="'.$key.'">'.$value.'</option>';
                                                }
                                            ?>
                                                                         
                                            </select> 
                                            </td></tr>


<tr><td style="text-align: center;" colspan="2"><input class="guidulieu" type="submit" value="Lưu"/></td></tr>
</table>
</div>
</form>
 